<template>
	<div class="wrap">
		<div class="top">
			<uni-nav-bar :fixed="true" background-color="#5C7FF5" leftWidth="120rpx" :dark="true" status-bar
				left-icon="left">
				<block slot="left">
					<div class="barContent">
						<img src="../../static/img/layout.png" alt="" class="layoutIcons" @click="toLayOut">
						<div class="barWord" @click="toEditName">{{ titlesname }}</div>
					</div>
				</block>
			</uni-nav-bar>
			<div class="content">
				<div class="inputBox">
					<input type="text" placeholder="请输入您要查找的内容" @input="othergetList" placeholder-class="inputP"
						v-model.trim="form.param" confirm-type="search" @confirm="othergetList">

					<div class="searchIcons" @click="toSearch">
						<img src="../../static/img/search.png" alt="" class="searchIcons_icons">
					</div>
					<img src="../../static/img/ca.png" alt="" class="ca" @click="toRq">

					<img src="../../static/img/index_fl.png" alt="" class="ca" @click="toFl">

				</div>
			</div>
			<!-- 搜索结果 -->
			<div class="chooseBox">
				<scroll-view scroll-x class="scrollview-box" scroll-with-animation>
					<div style="display: flex;">
						<div v-for="(item,i) in flArr" :key="i">
							<div class="chooseItem">
								<div>{{ item }}</div>
								<img src="../../static/img/closes.png" alt="" class="closesImg" @click="todelFl(item)">
							</div>

						</div>
					</div>
				</scroll-view>
			</div>
			<!-- 日期 visibility:
					hidden': 'visibility: visible' -->
			<div class="daysBox">
				<div class="years" v-if="copyDate.startTime && copyDate.endTime">
					<span>{{ copyDate.startTime }}</span> / <span>{{ copyDate.endTime }}</span>
				</div>
				<div class="nums">数量:{{ nums }}</div>
			</div>
		</div>
		<!-- 主题 -->
		<!--  -->
		<movable-refresh :backgroundColor="'white'" ref="movableRefresh" :scrollHeight="heights" :noMore="noMore"
			@refresh="refresh" @loadMore="loadMore" @onScroll="">
			<div class="orderContent" style="height: 100%;" v-if="datalist.length>0">
				<div class="orderItem" v-for="(item, i ) in datalist" :key="i">
					<img :src="list2" v-if="item.openid == isMyself || titlesname == '消缺人员'" alt="" class="orderItemImg"
						@click.self="toInfo(item.code)">
					<img :src="list1" v-else alt="" class="orderItemImg" @click.self="toInfo(item.code)">
					<div class="orderItemTop">{{ item.org }}</div>
					<div class="useContent" @click.self="toInfo(item.code)">
						<div class="useItem">
							<div class="labes">变电站:</div>
							<div class="useItem_content">{{ item.station }}</div>
						</div>
						<div class="useItem">
							<div class="labes">设备名称:</div>
							<div class="useItem_content">{{ item.deviceName }}</div>
						</div>
						<div class="useItem">
							<div class="labes">缺陷描述:</div>
							<div class="useItem_content quexian_word">{{ item.description }}</div>
						</div>
						<div class="useItem">
							<div class="labes">缺陷性质:</div>
							<div class="useItem_content">{{ item.level }}</div>
						</div>
						<div class="useItem">
							<div class="labes">缺陷发现人员:</div>
							<div class="useItem_content">{{ item.username }}</div>
						</div>
						<div class="useItem">
							<div class="labes">时间:</div>
							<div class="useItem_content">{{ item.time }}</div>
						</div>
					</div>
					<img v-if="item.status=='审核未通过'" src="../../static/img/shenhenopass.png" alt=""
						class="statusimg statusimg2" />
				</div>
			</div>
			<div class="orderContent" style="height: 600rpx;text-align: center;line-height: 300px;line-height: 300px;"
				v-else>
				暂无数据
			</div>
		</movable-refresh>




		<!-- 选择分类 -->
		<uni-popup ref="popup3" type="bottom" v-if="isShow">
			<lee-linkage :right="right" :left="left"> </lee-linkage>


		</uni-popup>

		<!-- 日期 -->
		<wu-calendar ref="calendar" @confirm="calendarConfirm" @close="cancel" :insert="false" mode="range"
			:rangeSameDay="true" :operationPosition="'bottom'" :itemHeight="50" @change="tochange" maskClick
			:clearDate="false" :date="[startTime, endTime]" @sendData="getData" @sendData2="getData2">
			<div slot="operation">
				<div class="rqbtn">
					<div class="fail btn" @click="cancel">取消</div>
					<div class="success btn" @click="calendarConfirm">确认</div>
				</div>
			</div>
		</wu-calendar>
		<!-- 添加 -->
		<div class="addBox" @click="toEdit" v-if="titlesname=='巡检人员'">
			<img src="../../static/img/fixadd.png" class="addBoxImg" alt="">
		</div>
		<!-- 警告 -->
		<div class="addBox1" v-if="titlesname=='消缺人员'" @click="togaojing">
			<div class="addNum">{{ warmNums }}</div>
			<img src="../../static/img/gaojingicons.png" class="addBoxImg" alt="">
		</div>
		<!-- 未通过审核快捷按钮 -->
		<div class="addBox2" v-if="titlesname=='消缺人员'" @click="togaoshenhenopass">
			<div class="addNum">{{ noshenhenum }}</div>
			<img src="../../static/img/sh.png" class="addBoxImg" alt="">
		</div>
		<!-- 登出 -->

		<layoutdialog ref="layoutdialog" :titles="titles">

		</layoutdialog>
		<!-- 修改姓名 -->
		<editdialog ref="editdialog" :titles="titles" :oldName="oldName">

		</editdialog>
		<!-- 登录 -->
		<dialogs ref="dialog">

		</dialogs>
	</div>
</template>

<script>
	import movableRefresh from '@/components/zyq-movableRefresh/zyq-movableRefresh.vue'
	//下拉刷新插件
	import {
		findDefect,
		findDictionary,
		findWarnDefectTotalNum,
		shenhegetnum,
		findStation
	} from '@/utils/http'
	import dialogs from "@/components/dialog.vue";
	import layoutdialog from "@/components/layoutdialog.vue";
	import editdialog from "@/components/editdialog.vue";

	import {
		nowDay
	} from "@/utils/filters"
	import uniPopup from "@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue";
	import leeLinkage from "./components/linkage.vue";
	import wuCalendar from '@/uni_modules/wu-calendar/components/wu-calendar/wu-calendar.vue'
	import uniNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
	import uniIcons from "@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
	export default {
		components: {
			editdialog,
			movableRefresh,
			uniNavBar,
			uniIcons,
			leeLinkage,
			uniPopup,
			wuCalendar,
			dialogs,
			layoutdialog
		},
		data() {
			return {
				noshenhenum: '',
				timepickervalue: '',
				timepickervalue2: '',
				list1: '../../static/img/list1.png',
				list2: '../../static/img/list2.png',
				oldName: '',
				titlesname: '',
				// left: [{
				// 	label: '运维单位',
				// 	id: 0,
				// 	type: 'ORG'
				// }, {
				// 	label: '设备类型',
				// 	id: 1,
				// 	type: 'DEVICE_TYPE'
				// }, {
				// 	label: '电压',
				// 	id: 2,
				// 	type: 'VOLTAGE'
				// }, {
				// 	label: '缺陷性质',
				// 	id: 3,
				// 	type: 'DEFECT_NATURE'
				// }],
				left: [{
						label: '运维单位',
						id: 0,
						type: 'ORG'
					},
					{
						label: '变电站',
						id: 1,
						type: 'STATION'
					},
					{
						label: '电压',
						id: 2,
						type: 'VOLTAGE'
					}, {
						label: '缺陷性质',
						id: 3,
						type: 'DEFECT_NATURE'
					}, {
						id: 4,
						type: 'DEFECT_STATUS',
						label: '状态'
					}, {
						label: '设备类型',
						id: 5,
						type: 'DEVICE_TYPE'
					},
				],
				right: [],
				totalPages: null,
				zwsj: false,
				isShow: false,
				deldatas: [],
				startTime: '', //开始事件
				endTime: '', //结束事件
				copyDate: {
					// startTime: '', //开始事件
					// endTime: '', //结束事件
					startTime: '', //开始事件
					endTime: '', //结束事件
				},
				form: {
					org: [], //运维单位
					voltage: [], //电压
					station: [],
					status: [],
					level: [], //性质
					deviceType: [], //设备类型
					startTime: '', //开始事件
					endTime: '', //结束事件
					param: "", //查询
					page: 1, //当前页面
					size: 10 // 

				},

				urls: '',
				flArr: [], //搜索分类
				noMore: false,
				dateRange: [],
				dates: [],
				//   复选框
				datalist: [],
				isMyself: '',
				nums: null,
				heights: null,
				warmNums: 0

			};
		},
		onLoad() {
			uni.getSystemInfo({
				success: (info) => {
					this.getElementInfo(`.top`).then(a => {
						console.log(a, 'aa')
						this.$nextTick(() => {
							this.heights = info.windowHeight - a.height - 20

						})

					})
				}
			});
		},
		onShow() {
			wx.hideTabBar()
			const pages = getCurrentPages()
			this.datalist = []
			this.form.page = 1

			this.isMyself = uni.getStorageSync('openid')
			this.titlesname = uni.getStorageSync('userInfo').role == 'inspection' ? "巡检人员" : '消缺人员'
			this.getList().then(res => {
				if (uni.getStorageSync('isToInfo').length != 0 && this.datalist.length > 0 && !uni.getStorageSync(
						'isToXq').startTime) {
					var arr = uni.getStorageSync('isToInfo');
					arr.forEach(item => {
						this.datalist.forEach(v => {
							if (v.id == item) {
								this.$nextTick(() => {
									v.checked = true
								})
							}
						})
					})
				}
			})
			setTimeout(() => {
				// console.log(1111)
				wx.removeStorageSync('isToInfo')
				wx.removeStorageSync('isToXq')
			}, 10)
			this.initData()

		},

		methods: {
			getElementInfo(selector) {
				return new Promise((resolve) => {
					const query = uni.createSelectorQuery().in(this);
					query
						.select(selector)
						.boundingClientRect((data) => {
							resolve(data);
						})
						.exec();
				});
			},
			togaojing() {
				var arr = []
				this.datalist.forEach(item => {
					if (item.checked == true) {
						arr.push(item.id)
					}
				})
				uni.setStorageSync('isToInfo', arr)
				uni.setStorageSync('isToXq', this.form)
				uni.navigateTo({
					url: '/pages/order/jinggaoIndex'
				})
			},
			togaoshenhenopass() {
				uni.navigateTo({
					url: '/pages/order/xiaoquenopass'
				})
			},
			reset() {
				this.$nextTick(() => {
					this.right.forEach(item => {
						item.isChoose = false;
						item.children.forEach(v => {
							v.isChoose = false
						})
					})
				})

			},
			toEditName() {
				this.oldName = uni.getStorageSync('account')
				this.$refs.editdialog.$refs.inputDialog.open();

			},
			getQuery(val) {
				// console.log(val, 'val22')
				this.right = val
				this.flArr = []
				for (var i in this.form) {
					if (Array.isArray(this.form[i])) {
						this.form[i] = []
					}
				}
				this.form.page = 1;
				this.form.size = 10;
				this.datalist = []
				if (val.length > 0) {
					val.forEach(item => {
						if (item.children && item.children.length > 0) {
							item.isChoose = item.children.some(v => {
								return v.isChoose == true
							})
						}
						if (item.isChoose == true) {
							// console.log(item, item.isChoose)
							var s = [];
							if (item.children && item.children.length > 0) {
								item.children.forEach(v => {
									if (v.isChoose == true) {
										if (v.code == "STATION") {
											s.push(v.station)
										} else {
											s.push(v.name)
										}
									}
								})
							}
							this.form[item.types] = s
						}
					})
				}
				this.getList()
			},
			othergetList() {
				this.form.page = 1;
				this.form.size = 10;

				this.datalist = []
				this.getList()
			},
			refresh() {
				this.form.page = 1;
				this.form.size = 10;
				this.datalist = []

				this.getList()
			},
			loadMore() {
				this.form.page++;
				this.getList()
			},
			getList() {
				return new Promise((solve, reject) => {
					if (uni.getStorageSync('isToXq')) {
						this.form = uni.getStorageSync('isToXq')
						this.form.page = 1
						this.startTime = this.form.startTime.split(' ')[0]
						this.endTime = this.form.endTime.split(' ')[0]
						this.copyDate.startTime = this.form.startTime.split(' ')[0]
						this.copyDate.endTime = this.form.endTime.split(' ')[0]
					} else {
						if (!this.startTime && !this.endTime) {
							this.form.startTime = ''
							this.form.endTime = ''
						} else {
							this.form.startTime = this.startTime + ' 00:00:00'
							this.form.endTime = this.endTime + ' 23:59:59'
						}

					}
					uni.showLoading({
						title: "加载中",
						mask: true,
					});
					var arr = []
					for (var i in this.form) {
						if (Array.isArray(this.form[i])) {
							if (this.form[i].length > 0) {
								console.log(this.form[i])
								this.form[i].forEach(item => {
									console.log(2222)
									arr.push(item)
								})
							}
						}
					}
					findWarnDefectTotalNum().then(res => {
						if (res.result.total > 999) {
							this.warmNums == '999+'
						} else {
							this.warmNums = res.result.total

						}
						console.log(res.result.total)
					})

					shenhegetnum().then((res) => {
						// console.log(res, '6767')
						this.noshenhenum = res.result.num
					})
					this.flArr = Array.from(new Set(arr))

					findDefect(this.form).then(res => {

						if (res.code == '0') {
							var data = res.result

							this.totalPages = data.totalCount
							this.nums = data.totalCount

							if (res.result.totalCount == 0) {
								this.datalist = []
								this.noMore = true

							} else {
								var arr = [];
								data.list ? (arr = data.list) : null;
								arr.forEach(item => {
									item.checked = false;
								})

								if (this.datalist.length < Number(data.totalCount)) {
									this.noMore = false

									this.datalist.forEach(item => {
										item.checked = false
									})
									this.datalist.push(...arr);
									this.datalist.length == Number(data.totalCount) ? this.noMore = true :
										this.noMore = false

								} else {

									console.log(1111)
									this.noMore = true

								}

							}


						} else {

							this.nums = 0;
						}
						this.$refs.movableRefresh.endLoad()
					}).finally(() => {
						uni.hideLoading()
					})
				})

			},

			todelFl(val) {
				for (var i in this.form) {
					if (Array.isArray(this.form[i])) {
						if (this.form[i].length > 0) {
							this.form[i].forEach((item, v) => {
								if (val == item) {
									this.form[i].splice(v, 1)
								}
							})
						}
					}
				}
				this.flArr.forEach((item, i) => {
					if (item == val) {
						this.right.forEach((item, index) => {
							item.children.forEach(vv => {
								if (val == vv.name || val == vv.station) {
									vv.isChoose = false
								}
							})

						})
						this.flArr.splice(i, 1)
					}
				})
				this.form.page = 1;
				this.form.size = 10;
				this.datalist = []
				setTimeout(() => {

					this.getList()
				}, 200)
			},

			gettreeCategorys() {
				return new Promise((resolve, reject) => {
					this.$nextTick(() => {
						if (uni.getStorageSync('userInfo').role == "inspection") {
							this.left.splice(4, 1)
						}
						this.left.filter(item => {
							findDictionary({
								code: item.type
							}).then(res => {
								item.children = res.result
								if (item.type == 'ORG') {
									item.types = 'org'
								}
								if (item.type == 'DEVICE_TYPE') {
									item.types = 'deviceType'
								}
								if (item.type == 'VOLTAGE') {
									item.types = 'voltage'
								}
								if (item.type == 'DEFECT_NATURE') {
									item.types = 'level'
								}
								if (item.type == 'STATION') {
									item.types = 'station'
								}
								if (item.type == 'DEFECT_STATUS') {
									item.types = 'status'
								}
								item.isChoose = false
								item.children.forEach(v => {
									v.isChoose = false
								})

								if (uni.getStorageSync('userInfo').role != "admin") {
									findStation({
										org: [this.left[0].children[0].name]
									}).then((res) => {
										this.left[1].children = res.result
										this.left[1].children.forEach((item,
											index) => {
											item.isChoose = false
											item.code = "STATION"
											item.id = index
										})
									})
								}
							})
						})
						resolve('ok')
					})

				})
			},
			initData() {

				return new Promise((resolve) => {
					this.gettreeCategorys().finally(res => {
						this.right = this.left

						resolve('ok')
					})
				});


			},



			// 关闭分类
			closeFl() {
				this.$refs.popup3.close();

			},
			toSearch() {
				this.datalist = []
				this.getList()
			},
			//分类搜索
			toDel(name) {
				this.flArr.forEach((item, i) => {
					if (item == name) {
						this.flArr.splice(i, 1)
					}
				})
			},
			// 日历
			cancel(e) {
				this.form.startTime = ''
				this.form.endTime = ''
				this.startTime = ''
				this.endTime = ''
				this.copyDate.startTime = ''
				this.copyDate.endTime = ''
				this.$refs['calendar'].reset()
				this.$refs['calendar'].close()
				this.datalist = []
				this.getList()
			},
			tochange(e) {
				// this.startTime = e.range.before
				// this.endTime = e.range.after
			},
			getData(e) {
				// console.log(e)
				this.timepickervalue = e
			},
			getData2(e) {
				// console.log(e)
				this.timepickervalue2 = e
			},
			toLayOut() {
				this.$refs.layoutdialog.$refs.inputDialog.open();


			},
			// 跳转
			toEdit() {
				var arr = []
				this.datalist.forEach(item => {
					if (item.checked == true) {
						arr.push(item.id)
					}
				})
				uni.setStorageSync('isToInfo', arr)
				uni.setStorageSync('isToXq', this.form)

				uni.navigateTo({
					url: '/pages/order/edit?u=index'
				})
			},
			toInfo(id) {
				var arr = []
				this.datalist.forEach(item => {
					if (item.checked == true) {
						arr.push(item.id)
					}
				})
				uni.setStorageSync('isToInfo', arr)
				uni.setStorageSync('isToXq', this.form)

				uni.navigateTo({
					url: '/pages/order/info?code=' + id + '&u=index'
				})
			},
			// 日期
			calendarConfirm(e) {
				if (this.timepickervalue && this.timepickervalue2) {
					if ((new Date(this.timepickervalue).getTime()) > (new Date(this.timepickervalue2).getTime())) {
						uni.showToast({
							title: '结束日期不能早于开始日期',
							icon: 'none',
							duration: 1500
						})
					} else {
						this.datalist = []
						this.copyDate.startTime = this.timepickervalue
						this.copyDate.endTime = this.timepickervalue2
						this.startTime = this.timepickervalue
						this.endTime = this.timepickervalue2
						this.form.page = 1
						this.getList()
						this.$refs['calendar'].close()
						this.timepickervalue = ''
						this.timepickervalue2 = ''
					}
				} else if (this.timepickervalue && this.timepickervalue2 == '') {
					let r = nowDay()
					if ((new Date(this.timepickervalue).getTime()) > (new Date(r).getTime())) {
						uni.showToast({
							title: '结束日期不能早于开始日期',
							icon: 'none',
							duration: 1500
						})
					} else {
						this.datalist = []
						this.copyDate.startTime = this.timepickervalue
						this.copyDate.endTime = nowDay()
						this.startTime = this.timepickervalue
						this.endTime = nowDay()
						this.form.page = 1
						this.getList()
						this.$refs['calendar'].close()
						this.timepickervalue = ''
						this.timepickervalue2 = ''
					}
				} else if (this.timepickervalue == '' && this.timepickervalue2) {
					let r = nowDay()
					if ((new Date(r).getTime()) > (new Date(this.timepickervalue2).getTime())) {
						uni.showToast({
							title: '结束日期不能早于开始日期',
							icon: 'none',
							duration: 1500
						})
					} else {
						this.datalist = []
						this.copyDate.startTime = nowDay()
						this.copyDate.endTime = this.timepickervalue2
						this.startTime = nowDay()
						this.endTime = this.timepickervalue2
						this.form.page = 1
						this.getList()
						this.$refs['calendar'].close()
						this.timepickervalue = ''
						this.timepickervalue2 = ''
					}
				} else if (this.timepickervalue == '' && this.timepickervalue2 == '') {
					this.datalist = []
					this.copyDate.startTime = nowDay()
					this.copyDate.endTime = nowDay()
					this.startTime = nowDay()
					this.endTime = nowDay()
					this.form.page = 1
					this.getList()
					this.$refs['calendar'].close()
				}

			},
			toFl() {
				uni.showLoading({
					title: '加载中'
				});
				if (this.flArr.length > 0) {
					this.flArr.forEach((item, i) => {
						this.right.forEach(a => {
							a.children.forEach(vv => {
								if (item == vv.name) {
									vv.isChoose = true
								}
							})
						})

					})
				}
				setTimeout(function() {
					uni.hideLoading();
				}, 200);
				this.isShow = true
				setTimeout(() => {
					this.$refs.popup3.open();

				}, 200)

			},
			toRq() {
				uni.showLoading({
					title: '加载中'
				});

				setTimeout(function() {
					uni.hideLoading();
				}, 1000);
				this.$refs.calendar.open();

			},
		}
	};
</script>

<style scoped lang="scss">
	.bg {
		width: 100vw;
		height: 100vh;

	}

	.wrap {
		height: 100vh;
		overflow: hidden;
	}

	.barContent {
		display: flex;
		justify-content: left;
	}

	.layoutIcons {
		width: 55rpx;
		height: 55rpx;
		margin-left: 16rpx;
	}

	.barWord {
		font-size: 34rpx;
		color: #FFFFFF;
		font-style: normal;
		width: 146rpx;
		margin-left: 14rpx;
		font-family: Source Han Sans CN, Source Han Sans CN;
		text-decoration: underline;
	}

	.addBox2 {
		width: 96rpx;
		height: 96rpx;
		position: fixed;
		bottom: 500rpx;
		right: 64rpx;
		z-index: 10;

		.addNum {
			display: inline-block;
			font-size: 24rpx;
			right: -54rpx;
			top: 36rpx;
			padding: 2rpx 8rpx;
			position: relative;
			background: #F33200;
			box-shadow: 0rpx 3rpx 6rpx 1rpx rgba(0, 0, 0, 0.16);
			border-radius: 21rpx 21rpx 21rpx 21rpx;
			color: white;

		}

		.addBoxImg {
			width: 100%;
			height: 100%;
		}
	}

	.content {

		box-sizing: border-box;
		padding: 16rpx 32rpx;

		.inputBox {
			position: relative;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.searchIcons {
				padding: 20rpx;
				position: absolute;
				left: 482rpx;
				z-index: 10;
			}

			.searchIcons_icons {
				width: 30rpx;
				height: 30rpx;
			}

			input {
				width: 546rpx;
				box-sizing: border-box;
				padding: 0rpx 38rpx;

				height: 68rpx;
				border-radius: 29rpx 29rpx 29rpx 29rpx;
				border: 1rpx solid #5C7FF5;
				font-family: Source Han Sans CN, Source Han Sans CN;
				font-weight: 400;
				font-size: 26rpx;
			}

			.searchBox {
				position: absolute;
				text-align: center;
				right: 76rpx;
				top: 0rpx;
				width: 136rpx;
				height: 58rpx;
				line-height: 58rpx;
				background: #5C7FF5;
				border-radius: 29rpx 29rpx 29rpx 29rpx;

				font-family: Source Han Sans CN, Source Han Sans CN;
				font-weight: 400;
				font-size: 28rpx;
				color: #FFFFFF;
			}
		}

		.ca {
			width: 48rpx;
			height: 48rpx;
		}
	}

	// 搜索结果
	.chooseBox {
		width: 100%;
		box-sizing: border-box;
		padding: 0 32rpx;

		.scrollview-box {}

		.chooseItem {
			margin-right: 20rpx;
			box-sizing: border-box;
			padding: 10rpx 20rpx;
			background: #5C7FF5;
			border-radius: 29rpx 29rpx 29rpx 29rpx;
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 28rpx;
			color: #FFFFFF;
			position: relative;
			white-space: nowrap;
		}

		.closesImg {
			width: 50rpx;
			height: 50rpx;
			top: -10rpx;
			position: absolute;
			right: -16rpx;
		}
	}


	// 日历
	.daysBox {
		box-sizing: border-box;
		padding: 0 32rpx;
		display: flex;
		justify-content: space-between;
		margin: 22rpx 0;

		.years {
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 22rpx;
			color: #5C7FF5;
			font-style: normal;
		}

		.nums {
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 26rpx;
			color: #E60000;
		}
	}

	// 主题
	.orderContent {
		box-sizing: border-box;
		padding: 20rpx 32rpx;
		background: white;

		.scrollerSize {
			width: 100%;
			height: calc(100vh - 310rpx);
		}

		.orderItem {
			position: relative;
			width: 685rpx;
			height: 439rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 3rpx 6rpx 1rpx rgba(0, 0, 0, 0.16);
			border-radius: 12rpx 12rpx 12rpx 12rpx;
			margin-bottom: 20rpx;

			.orderItemImg {
				width: 100%;
				height: 100%;
				position: absolute;
				z-index: 0;

			}

			.statusimg {
				position: absolute;
				width: 121rpx;
				height: 82rpx;
				top: 250rpx;
				right: 85rpx;
			}

			.statusimg2 {
				width: 155.92rpx;
				height: 90.17rpx;
			}

			.orderItemTop {
				z-index: 1;
				padding-top: 16rpx;
				margin-left: 41rpx;
				font-family: Source Han Sans CN, Source Han Sans CN;
				font-weight: bold;
				font-size: 28rpx;
				color: #FFFFFF;
				font-style: normal;
				position: relative;
			}
		}

		.useContent {
			position: relative;
			// padding-top:rpx;
			height: 350rpx;
			margin-top: 20rpx;
			margin-left: 41rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 28rpx;
			color: #313131;
			font-style: normal;
		}
	}

	// 日期
	.chooseTime {
		display: flex;

	}

	.chooseTimeItem {
		text-align: center;
		width: 50%;
		flex-direction: column;
		align-items: center;
	}

	.hasRq {
		background: #FFFFFF;
		border-radius: 37rpx 37rpx 37rpx 37rpx;
		border: 1rpx solid #707070;
		width: 300rpx;
		font-family: Source Han Sans CN, Source Han Sans CN;
		font-weight: 400;
		font-size: 28rpx;
		color: #262626;
		margin: 0 auto;
		height: 44rpx;
	}

	.rqbtn {
		display: flex;
		justify-content: flex-end;
		box-sizing: border-box;
		padding: 0 30rpx;
		margin-top: 20rpx;

		.btn {
			width: 160rpx;
			height: 70rpx;
			border-radius: 40rpx 40rpx 40rpx 40rpx;
			text-align: center;
			line-height: 70rpx;
		}

		.fail {
			margin-right: 30rpx;
			background: #FFFFFF;

			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 28rpx;
			border: 1rpx solid #707070;

			color: #262626;
		}

		.success {
			background: #5C7FF5;
			border-radius: 40rpx 40rpx 40rpx 40rpx;
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 28rpx;
			color: #FFFFFF;
		}
	}

	.addBox1 {
		width: 96rpx;
		height: 96rpx;
		position: fixed;
		bottom: 318rpx;
		right: 64rpx;
		z-index: 10;

		.addNum {
			display: inline-block;
			font-size: 24rpx;
			right: 4px;
			top: 0rpx;
			padding: 2rpx 8rpx;
			position: absolute;
			background: #F33200;
			box-shadow: 0rpx 3rpx 6rpx 1rpx rgba(0, 0, 0, 0.16);
			border-radius: 21rpx 21rpx 21rpx 21rpx;
			color: white;

		}

		.addBoxImg {
			width: 100%;
			height: 100%;
		}
	}

	.addBox {
		width: 96rpx;
		height: 96rpx;
		position: fixed;
		bottom: 176rpx;
		right: 64rpx;

		.addBoxImg {
			width: 100%;
			height: 100%;
		}
	}
</style>
<style scoped>
	.wrap>>>.uni-navbar__header-btns {
		width: 300rpx !important;
	}

	input>>>.inputP {
		color: #B7B7B7;
		font-family: SourceHanSansCN-Regular, SourceHanSansCN-Regular;
		font-weight: normal;
		font-size: 28rpx;
		line-height: 58rpx;
		color: #B7B7B7;
	}

	.noMore {
		margin-top: 68rpx;
		text-align: center;
		padding-bottom: 200rpx;
	}

	.useItem {
		display: flex;
	}

	.labes {
		width: 190rpx;
	}

	.useItem_content {
		flex: 1;
	}
</style>